﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using TvTipper.Core;

namespace TvTipper
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                Services.EntityManager.Initialize();
            }
            catch (Exception)
            {
                MessageBox.Show("Failed to initialize, make sure the DB is reachable",
                    "Error",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error);
                return;
            }

            Application.Run(new MainForm());
        }
    }
}
